﻿using QFramework;

namespace HKTools
{
    public class CMD_UDP_Start : AbstractCommand
    {
        int localPort;

        public CMD_UDP_Start(int localPort)
        {
            this.localPort = localPort;
        }

        protected override void OnExecute()
        {
            if (localPort == 0)
            {
                HKDebug.LogError("localPort 与 broadcastPort 不能为0");
                return;
            }

            this.GetSystem<IHK_UdpSystem>().StartUDP(localPort);
        }
    }
}